package com.zoffy.oj_backend.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zoffy.oj_backend.common.IdRequest;
import com.zoffy.oj_backend.model.dto.question.JudgeCase;
import com.zoffy.oj_backend.model.dto.question.QuestionAddRequest;
import com.zoffy.oj_backend.model.dto.question.QuestionQueryRequest;
import com.zoffy.oj_backend.model.dto.question.QuestionUpdateRequest;
import com.zoffy.oj_backend.model.entity.Question;
import com.zoffy.oj_backend.model.vo.QuestionTinyVo;
import com.zoffy.oj_backend.model.vo.QuestionVo;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author 86170
 * @description 针对表【question(题目表)】的数据库操作Service
 * @createDate 2024-02-19 00:29:02
 */
public interface QuestionService extends IService<Question> {
    Long addQuestion(HttpServletRequest request, QuestionAddRequest questionAddRequest);

    Boolean deleteQuestion(IdRequest idRequest);
    Boolean updateQuestion(QuestionUpdateRequest questionUpdateRequest);
    Boolean uploadJudgeCases(HttpServletRequest request,long questionId,MultipartFile file);

    IPage<QuestionVo> listQuestionVoByPage(QuestionQueryRequest questionQueryRequest);
    IPage<QuestionTinyVo> listQuestionTinyVoByPage(QuestionQueryRequest questionQueryRequest);
    IPage<QuestionVo> listMyQuestionVoByPage(HttpServletRequest request,QuestionQueryRequest questionQueryRequest);
    QuestionVo getQuestionVoById(long id);
    List<JudgeCase> getJudgeCases(String JudgeCaseUrl);
}
